﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Emoney.UserTraining.Model;

namespace Emoney.UserTraining.DAL
{
    public class Web_TrainAdminDAL
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public Web_TrainAdmin Login(string userName, string pwd)
        {
            using (EMweb_newContext context = new EMweb_newContext())
            {
                var tb = context.UserInfoS;
                var result = from p in tb
                             where p.username == userName && p.pwd == pwd
                             select p;
                return result.FirstOrDefault();
            }
        }
    }
}
